package com.deductive.domain.wq;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 卫勤任务表
 * @TableName disposition_wq_wqrw
 */
@TableName(value ="disposition_wq_wqrw")
@Data
public class DispositionWqWqrw implements Serializable {
    /**
     * id
     */
    @TableId(value = "id",type= IdType.AUTO)
    private Integer id;

    /**
     * 任务名称
     */
    @TableField(value = "task_name")
    private String taskName;

    /**
     * 任务编号
     */
    @TableField(value = "task_number")
    private String taskNumber;

    /**
     * 任务类型
     */
    @TableField(value = "task_type")
    private String taskType;

    /**
     * 关联的作战任务
     */
    @TableField(value = "gldzzrw")
    private String gldzzrw;

    /**
     * 保障目标
     */
    @TableField(value = "guarantee_objective")
    private String guaranteeObjective;

    /**
     * 保障区域UUID
     */
    @TableField(value = "guarantee_region_uuid")
    private String guaranteeRegionUuid;

    /**
     * 任务持续时间
     */
    @TableField(value = "duration")
    private String duration;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DispositionWqWqrw other = (DispositionWqWqrw) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTaskName() == null ? other.getTaskName() == null : this.getTaskName().equals(other.getTaskName()))
            && (this.getTaskNumber() == null ? other.getTaskNumber() == null : this.getTaskNumber().equals(other.getTaskNumber()))
            && (this.getTaskType() == null ? other.getTaskType() == null : this.getTaskType().equals(other.getTaskType()))
            && (this.getGldzzrw() == null ? other.getGldzzrw() == null : this.getGldzzrw().equals(other.getGldzzrw()))
            && (this.getGuaranteeObjective() == null ? other.getGuaranteeObjective() == null : this.getGuaranteeObjective().equals(other.getGuaranteeObjective()))
            && (this.getGuaranteeRegionUuid() == null ? other.getGuaranteeRegionUuid() == null : this.getGuaranteeRegionUuid().equals(other.getGuaranteeRegionUuid()))
            && (this.getDuration() == null ? other.getDuration() == null : this.getDuration().equals(other.getDuration()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTaskName() == null) ? 0 : getTaskName().hashCode());
        result = prime * result + ((getTaskNumber() == null) ? 0 : getTaskNumber().hashCode());
        result = prime * result + ((getTaskType() == null) ? 0 : getTaskType().hashCode());
        result = prime * result + ((getGldzzrw() == null) ? 0 : getGldzzrw().hashCode());
        result = prime * result + ((getGuaranteeObjective() == null) ? 0 : getGuaranteeObjective().hashCode());
        result = prime * result + ((getGuaranteeRegionUuid() == null) ? 0 : getGuaranteeRegionUuid().hashCode());
        result = prime * result + ((getDuration() == null) ? 0 : getDuration().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", taskName=").append(taskName);
        sb.append(", taskNumber=").append(taskNumber);
        sb.append(", taskType=").append(taskType);
        sb.append(", gldzzrw=").append(gldzzrw);
        sb.append(", guaranteeObjective=").append(guaranteeObjective);
        sb.append(", guaranteeRegionUuid=").append(guaranteeRegionUuid);
        sb.append(", duration=").append(duration);
        sb.append(", remark=").append(remark);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}